package org.xinghai.sql.main.generator.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jakarta.validation.constraints.NotBlank;
import org.xinghai.sql.main.generator.domain.TableColumns;

/**
* @author lijia
* &#064;description  针对表【table_columns】的数据库操作Mapper
* &#064;createDate  2025-07-28 11:45:59
* &#064;Entity  generator.domain.TableColumns
 */
public interface TableColumnsMapper extends BaseMapper<TableColumns> {

    /**
     * 从表名和列名查询列id
     * @param tableName 表名
     * @param columnName 列名
     * @return 列id
     */
    Integer getColumnIdFromTableNameAndColumnName(String tableName, String columnName);

    /**
     * 从表名、列名和外键表id查询列id
     * @param tableId 表id
     * @param columnName 列名
     * @return 列id
     */
    Integer getColumnIdFromTableNameAndColumnNameAndForeignTableId(Integer tableId, String columnName);


    void removeByDatabaseName(String databaseName);
}




